$(document).ready(function(){
	
	var FJID= $("#DIS_FJID").text();
	var HmtlNameID = $("#DIS_HtmlName").text();
	//alert(HmtlNameID);
	/*if(HmtlNameID!==null && HmtlNameID.length>0){
		$("#uploadFrame").attr("src","/ag/hmkuploads/"+HmtlNameID);
		//$("#uploadFrame").attr("src","hmk/doc/law1.doc");
	}else{
		$("#uploadFrame").attr("src","/ag/hmk/MyHtml.html"); //hmk/doc/law1.doc
	}       8_29*/
	/*
	if(FJID!==null){
		$("#uploadFrame").attr("src","hmkuploads/"+FJID);
		//$("#uploadFrame").attr("src","hmk/doc/law1.doc");
	}else{
		$("#uploadFrame").attr("src",""); //hmk/doc/law1.doc
	}*/
	
	//下载附件
	$("#downLoadFileID").click(function(){
		var lawID = $("#lawID").text();
		window.location.href="/ag/hmk/HMKdownload.action?lawID="+lawID+"&findtype=0";
	});
	
	
	//编辑法规
	$("#EDIT_law").click(function(){
		var lawID = $("#lawID").text();
		window.location.href="/ag/hmk/findOneLaw_findOneLaw.action?lawID1="+lawID+"&findType1=1";
		//window.location.href="/ag/hmk/findOneTeam_getOneTeam.action?teamID="+lawID;
		//window.location.replace("hmk/editAidTeam.jsp");
	});
	
	//删除法规
	$("#del_law").click(function(){
		var isPass = confirm("确定要删除吗？");
		if(isPass){
			var lawID = $("#lawID").text();
			var url = 'hmk/delLaw_delLaw.action';
			var params = {
				lawID1:lawID
			}; 
			jQuery.post(url, params, delData, 'json');
		}
		
	});
	
	//返回法规列表
	$("#BACK_law").click(function(){
		window.location.href="/ag/hmk/LawMain.jsp";
	});
	
});



function delData(data){
	if(data.delString=='1'){
		alert("删除成功");
		window.location.replace("/ag/hmk/LawMain.jsp");
	 }else{
		alert("删除失败");
	 }
}